package com.sword.memcached;

import java.io.IOException;  
import java.net.InetSocketAddress;
  
import net.spy.memcached.MemcachedClient; 
public class NoCas {
	public static void main(String[] args) throws IOException {  
        MemcachedClient cache = new MemcachedClient(new InetSocketAddress("127.0.0.1", 11211));
        cache.set("x", 1800, "Love");    
        String obj1 = (String) cache.get("x");        
        String obj2 = (String) cache.get("x");
        obj2 = "Michael";        
        cache.set("x", 1800, obj2);  
        System.out.println("Non-CAS 2:\t" + obj2);  
        System.out.println("Non-CAS 1:\t" + obj1);  
    }  
}
